﻿using System;
using System.Collections.Generic;

namespace DesignPattern.test {
    /// <summary>
    /// test
    /// </summary>
    public abstract class Class1 {
        private List<int> ageList=new List<int>();

        private int age;
        
        public void add(int x){
            age = x;
            ageList.Add(x);
        }

        public void get(){
            Console.WriteLine(age);
        }
        
        public void show(){
            ageList.ForEach(age=>Console.Write(age+"\t"));
        }
    }
}